$OpenBSD: patch-aclocal_m4,v 1.2 2013/01/23 21:17:30 zhuk Exp $
--- aclocal.m4.orig	Thu Mar 21 00:23:10 2002
+++ aclocal.m4	Wed Nov 21 22:20:46 2012
@@ -606,7 +606,7 @@ ac_libs_safe="$LIBS"
 
 CXXFLAGS="$CXXFLAGS -I$qt_includes"
 LDFLAGS="$X_LDFLAGS"
-LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+LIBS="-lqt-mt -pthread -lXext -lX11 $LIBSOCKET"
 LD_LIBRARY_PATH=
 export LD_LIBRARY_PATH
 LIBRARY_PATH=
@@ -653,7 +653,7 @@ AC_DEFUN(AC_PATH_QT_1_3,
 [
 AC_REQUIRE([K_PATH_X])
 AC_REQUIRE([KDE_USE_QT])
-LIBQT=${LIBQTMT:-"-lqt"}
+LIBQT=${LIBQTMT:-"-lqt-mt -pthread"}
 if test $kde_qtver = 2; then
   
   AC_REQUIRE([AC_FIND_PNG])
@@ -793,7 +793,7 @@ AC_SUBST(QT_INCLUDES)
 AC_SUBST(QT_LDFLAGS)
 AC_PATH_QT_MOC
 
-LIB_QT="${LIBQTMT:--lqt}"' $(LIBPNG) -lXext $(LIB_X11) $(X_PRE_LIBS)'
+LIB_QT="${LIBQTMT:--lqt-mt}"' -pthread $(LIBPNG) -lXext $(LIB_X11) $(X_PRE_LIBS)'
 AC_SUBST(LIB_QT)
 
 ])
@@ -841,7 +841,7 @@ AC_CACHE_VAL(ac_cv_have_kde,
 if test -z "$1"; then
 
 kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes"
-test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR $kde_incdirs"
+test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
 kde_incdirs="$ac_kde_includes $kde_incdirs"
 AC_FIND_FILE(ksock.h, $kde_incdirs, kde_incdir)
 ac_kde_includes="$kde_incdir"
